package cn.wolfcode.ssm.mapper;

import cn.wolfcode.ssm.domain.Employee;
import cn.wolfcode.ssm.domain.Notice;
import cn.wolfcode.ssm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface NoticeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Notice record);

    Notice selectByPrimaryKey(Long id);

    List<Notice> selectAll();

    int updateByPrimaryKey(Notice record);

    List<Notice> selectForList(@Param("qo") QueryObject qo, @Param("employee") Employee employee);

    void updateReadStatus(@Param("employeeId") Long employeeId , @Param("noticeId") Long noticeId);

    void insertRelationship(@Param("employees") List<Employee> employees, @Param("id") Long id);

    void updateReleaseStatus(@Param("id") Long id, @Param("releaseStatus") Boolean releaseStatus);

    int countNoRead(Long id);

}